package com.hua.method;
//排序练习
public class Demo05_ {
    public static void main(String[] args) {
        printMax(1,2,3,45,6,78,321,23,123.,21,2,2.,2,2131);
        printMax();
    }
    public static void printMax(double... numbers){
        if (numbers.length ==0){
            System.out.println("无法排序,请输入参数值");
            return;
        }
        double result = numbers[0];
        for (int i = 1; i < numbers.length; i++) {
            if (numbers[i] > result){
                result = numbers[i];
            }
        }
        System.out.println("最大值为："+result);


    }





}
